package cn.aitrox.ry.service.auth.mapper;

import cn.aitrox.ry.service.auth.entity.AuthRolePermissionEntity;
import com.github.abel533.mapper.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthRolePermissionMapper extends Mapper<AuthRolePermissionEntity> {

    void deleteByRoleIds(@Param("roleIds") List<Integer> roleIds);

    void deleteByPermissionIds(@Param("permissionIds") List<Integer> permissionIds);

    void batchInsert(@Param("list") List<AuthRolePermissionEntity> list);

    void deleteByRoleIdPermissionIds(@Param("roleId") Integer roleId, @Param("permissionIds") List<Integer> permissionIds);

    List<AuthRolePermissionEntity> findByRoleIds(@Param("roleIds") List<Integer> roleIds);
}
